#pragma once

class CFileDownInfoList : public CWindowImpl<CFileDownInfoList, CListViewCtrl>
{
public:
	typedef enum _INFO_STATUS {
		ST_INFO = 0,
		ST_OK,
		ST_ERROR,
		ST_OTHER
	} INFO_STATUS;

public:
	BEGIN_MSG_MAP(CFileDownInfoList)
		MESSAGE_HANDLER(WM_CREATE, OnCreate)
		MESSAGE_HANDLER(WM_SIZE, OnSize)
		MESSAGE_HANDLER(WM_RESIZECOLUMN, OnResizeColumn)

	ALT_MSG_MAP(1)			//We check the msg from the parent window
		NOTIFY_CODE_HANDLER(NM_CUSTOMDRAW, OnCustomDrawColumn)
	END_MSG_MAP()

public:
	CFileDownInfoList();
	~CFileDownInfoList();

	void ShowInfo(INFO_STATUS infoStatus, LPCWSTR lpcwstrInfo);

public:
	LRESULT OnCreate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
	LRESULT OnSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
	LRESULT OnResizeColumn(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);

	LRESULT OnCustomDrawColumn(int idCtrl, LPNMHDR lpnmhdr, BOOL& bHandled);

public:

	UINT m_uiListItemIndex;
};
